package cn.stylefeng.guns.modular.ums.mapper;

import cn.stylefeng.guns.modular.ums.entity.Member;
import cn.stylefeng.guns.modular.ums.model.params.MemberParam;
import cn.stylefeng.guns.modular.ums.model.result.MemberResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 会员信息表 Mapper 接口
 * </p>
 *
 * @author yzb
 * @since 2019-11-07
 */
public interface MemberMapper extends BaseMapper<Member> {

    /**
     * 获取列表
     *
     * @author yzb
     * @Date 2019-11-07
     */
    List<MemberResult> customList(@Param("paramCondition") MemberParam paramCondition);

    /**
     * 获取map列表
     *
     * @author yzb
     * @Date 2019-11-07
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") MemberParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author yzb
     * @Date 2019-11-07
     */
    Page<MemberResult> customPageList(@Param("page") Page page, @Param("paramCondition") MemberParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author yzb
     * @Date 2019-11-07
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") MemberParam paramCondition);

    /**
     * 获取会员信息
     * @param paramCondition
     * @return
     */
    MemberResult getMember(@Param("paramCondition") MemberParam paramCondition);

    /**
     * 根据ID查询会员信息
     * @param memberId
     * @return
     */
    MemberResult getMemberById(@Param("memberId") Integer memberId);

    /***
     * 查询逗号隔开的学生集合
     * @param idList
     * @return
     */
    String getMemberNameByArrIds(int[] idList);

}
